package itemCalc.common;

import java.util.Iterator;
import java.util.List;

import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;

public class CalculatorManager {

	public static void addToList(List itemList, ItemStack stack) {
		itemList.add(new ItemStack(stack.itemID, stack.getItemDamage(), 1));
		
	}

	public static void addFinalItem(ItemStack itemstack, List list) {
		if(!listContainsItem(list, itemstack)){
			list.add(new ItemStack(itemstack.itemID, itemstack.getItemDamage(), 1));
		}
		
	}

	public static List getIngredients(ItemStack itemstack) {
		List allRecipes = CraftingManager.getInstance().getRecipeList();
		
		Iterator iterator = allRecipes.iterator();
		while (iterator.hasNext()){
			IRecipe recipe = (IRecipe) iterator.next();
			if(recipe.getRecipeOutput().))
		}
		
		
		return null;
	}
	public static boolean listContainsItem(List list, ItemStack stack){
		Iterator iterator = list.iterator();
		while(iterator.hasNext()){
			ItemStack stk = (ItemStack) iterator.next();
			if(stk.itemID == stack.itemID){
				return true;
			}
		}
		return false;
	}
}
